package com.tengju.user.domain.model.user;

import com.tengju.user.domain.shared.IdObject;

import java.util.Objects;

public class UserId extends IdObject {
    /**
     * Instantiates a new Id object.
     *
     * @param value the value
     */
    public UserId(long value) {
        super(value);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        IdObject idObject = (IdObject) o;
        return sameValueAs(idObject);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.getValue());
    }
}
